<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;
use Dcat\Admin\Traits\ModelTree;

class GrGoodsType extends Model
{
	use HasDateTimeFormatter;
	use ModelTree;
    protected $table = 'gr_goods_type';

    protected $primaryKey = 'goods_type_id';

    protected $titleColumn = 'goods_type_name';

    protected $parentColumn = 'pid';

    public function getOrderColumn()
    {
        return null;
    }

    public function mold(){
        return $this->hasOne(GoodsTypeMold::class,'goods_mold_id','goods_mold_id');
    }
}
